import request from '@/plugin/axios'

export function GetCourse (data) {
  return request({
    url: '/course/get',
    method: 'get',
    params: {
      spId: data.spId,
      ...data
    }
  })
}

export function GetAllCourse (data) {
  return request({
    url: '/course/getAll',
    method: 'get',
    params: {
      ...data
    }
  })
}

export function AddCourse (data) {
  return request({
    url: '/course/add',
    method: 'post',
    params: {
      spId: data.spId,
      ...data
    }
  })
}

export function UpdateCourse (data) {
  return request({
    url: '/course/update',
    method: 'put',
    params: {
      spId: data.spId,
      ...data
    }
  })
}

export function DelCourse (data) {
  return request({
    url: '/course/del',
    method: 'put',
    params: {
      spId: data.spId,
      ...data
    }
  })
}
